<?php

namespace App\Http\Requests\Validators\Backend\UserManage;

use App\Http\Requests\Validators\BaseValidator;

class RoleValidator extends BaseValidator
{
    public function addRoleToUserRules()
    {
        return [
            'user_id' => 'required | numeric',
            'role_id' => 'required | numeric',
        ];
    }
    public function storeRules()
    {

        return [
            'name' => 'required | string | max:100',
            'alias' => 'required | string | max:50',
        ];
    }

    public function editRules()
    {

        return [
            'name' => 'string | max:100',
            'alias' => 'string | max:50',
        ];
    }

    public function searchRules()
    {

        return [
            'name' => 'string | max:100',
            'alias' => 'string | max:50',
            'begin_time' => 'date_format:Y-m-d H:i:s',
            'end_time' => 'date_format:Y-m-d H:i:s',
        ];
    }
}
